package bb.lanxing.activity.base;

import android.content.res.TypedArray;
import android.os.Bundle;

public class BasePopupActivity extends BaseActivity {
    protected int activityCloseEnterAnimation;
    protected int activityCloseExitAnimation;

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        TypedArray obtainStyledAttributes = getTheme().obtainStyledAttributes(new int[]{android.R.attr.windowAnimationStyle});
        int resourceId = obtainStyledAttributes.getResourceId(0, 0);
        obtainStyledAttributes.recycle();
        TypedArray obtainStyledAttributes2 = getTheme().obtainStyledAttributes(resourceId,
                new int[]{android.R.attr.activityCloseEnterAnimation, android.R.attr.activityCloseExitAnimation});
        this.activityCloseEnterAnimation = obtainStyledAttributes2.getResourceId(0, 0);
        this.activityCloseExitAnimation = obtainStyledAttributes2.getResourceId(1, 0);
        obtainStyledAttributes2.recycle();
    }

    @Override
    public void finish() {
        super.finish();
        overridePendingTransition(this.activityCloseEnterAnimation, this.activityCloseExitAnimation);
    }
}
